package com.clk.portfoy.complib.portfoy.degerlendirme;

import javax.swing.JScrollPane;
import javax.swing.border.EtchedBorder;

import com.clk.desktop.gui.components.basic.ClkPanel;
import com.clk.portfoy.PortfoyStatics;
import com.clk.portfoy.classlib.portfoy.InfPortfoyObserver;
import com.clk.portfoy.classlib.portfoy.Portfoy;

public class ClkDegerlendirmePanel extends ClkPanel implements InfPortfoyObserver {

	private JScrollPane scrollPane;
	private ClkDegerlendirmeTable clkDegerlendirmeTable;
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	// ---------------------------------------------------------------------------------
	public ClkDegerlendirmePanel() {
		super();
		initGUI();
		PortfoyStatics.PORTFOY.register(this);
		notifyObs(PortfoyStatics.PORTFOY);
	}

	// ---------------------------------------------------------------------------------
	private void initGUI() {
		setLayout(null);
		setBorder(new EtchedBorder(EtchedBorder.LOWERED));
		{
			scrollPane = new JScrollPane();
			scrollPane.setBounds(10, 10, 978, 179);
			add(scrollPane);
			{
				clkDegerlendirmeTable = new ClkDegerlendirmeTable();
				scrollPane.setViewportView(clkDegerlendirmeTable);
			}
		}
	}

	// ---------------------------------------------------------------------------------

	@Override
	public void notifyObs(Portfoy p) {
		// TODO Auto-generated method stub
		this.clkDegerlendirmeTable.setPortfoy(PortfoyStatics.PORTFOY);
	}
	// ---------------------------------------------------------------------------------
}
